package spring.j2024_11_19_2.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import spring.j2024_11_19_2.dao.UserDao;
import spring.j2024_11_19_2.model.UserModel;

import java.util.List;

@RequestMapping("/user")
@Controller
@ResponseBody
public class UserController {
    private UserDao userDao ;

    public UserController(UserDao userDao){
        this.userDao = userDao;
    }
    @RequestMapping("/getList")
    public List<UserModel> getList(){
        return userDao.getList();
    }
}
